package com.bhs.sansong.adapter;

import android.graphics.Color;

import androidx.annotation.NonNull;

import com.bhs.sansong.R;
import com.bhs.sansong.bean.FeeDetail;
import com.bhs.sansong.utils.MyUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

public class FeeDetailAdapter extends BaseQuickAdapter<FeeDetail, BaseViewHolder> {

    public FeeDetailAdapter() {
        super(R.layout.item_obvious);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, FeeDetail item) {
        helper.setText(R.id.tv_type_name, item.getFee_notice());
        helper.setText(R.id.tv_money, String.format("%s元", MyUtils.checkPoint(item.getMoney())));
        if(item.getFee_notice().equals("优惠券")){
            helper.setTextColor(R.id.tv_money, Color.parseColor("#FF6067"));
        }else {
            helper.setTextColor(R.id.tv_money, Color.parseColor("#000000"));
        }
    }
}
